package com.ruoyi.web.controller.user;

import com.ruoyi.system.domain.dto.UserDto;
import com.ruoyi.system.domain.vo.UserVo;
import com.ruoyi.system.service.IUserService;
import com.ruoyi.system.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/house/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @PostMapping("/list")
    public Map getUserList(@RequestBody UserDto user){
        return userService.getUserList(user);

    }
    //修改状态
    @PutMapping("/changeUserStatus")
    private void changeStates(@RequestBody UserVo user){

        userService.changeStates(user.getUserId(),user.getStates());
    }
}
